<template>
  <div class="page-container">
    <div class="w">
      <div class="company">
        <h1 class="name">公司简介</h1>
        <div class="text">
          宏源地产的愿景与使命是把数宁世界带入每个人,每个家庭，每个组织，构造温馨每一户家庭
        </div>
      </div>
      <div class="content">
        <div v-for="item in list" :key="item.id" class="item">
          <h2 style="text-align: center; margin-bottom: 10px;">{{ item.title }}</h2>
          <el-row type="flex" justify="space-between">
            <div style="text-indent: 2em;" v-html="item.content" class="detail"></div>
          </el-row>
        </div>
      </div>
    </div>
    <FooterIndex />
  </div>
</template>

<script>
import { getPageList } from '@/api/page'
export default {
  name: 'PageIndex',
  data() {
    return {
      params: {
        _start: 0,
        _limit: 999
      },
      list: []
    }
  },
  created() {
    this.getPageList()
  },
  methods: {
    // 获取页面数据
    async getPageList() {
      this.list = await getPageList(this.params)
    }
  }
}
</script>

<style lang="scss" scoped>
.page-container {
  padding-top: 220px;
  background: url('~@/assets/common/page.jpg') no-repeat;
  background-size: 105%;
  .company {
    margin-bottom: 250px;
    color: #fff;
    text-align: center;
    .name {
      margin-bottom: 20px;
    }
    .text {
      margin-bottom: 100px;
    }
  }
  .content {
    height: 600px;
    padding: 10px;
    // border: 1px solid #eee;
    .item {
      margin-bottom: 30px;
      .item-img {
        width: 300px;
        height: 200px;
      }
    }
  }
}
::v-deep .content{
  img{
    width: 200px;
  }
}
</style>
